package com.cjm.one.common.result;

import lombok.Getter;

@Getter
public enum ResultCodeEnum {
    SUCCESS(200,"请求成功"),
    FAIL(201, "请求失败"),
    REMOTE_SERVICE_ERROR(503, "远程服务调用失败"),
    SERVICE_ERROR(202, "服务异常"),
    UPDATE_ERROR(203, "数据更新失败"),
    DATA_ERROR(204, "数据异常"),
    ILLEGAL_REQUEST(205, "非法请求"),
    REPEAT_SUBMIT(206, "重复提交"),
    SERVICE_UNAVAILABLE(207, "当前服务不可用"),
    LOCK_ERROR(208, "加锁异常"),

    FEIGN_FAIL(207, "远程调用失败"),
    ARGUMENT_VALID_ERROR(208, "参数校验异常"),
    LOGIN_AUTH(2099, "未登陆"),
    PERMISSION(210, "没有权限"),
    AUTHENTICATION_ERROR(210, "认证授权异常"),
    LOGIN_METHOD_INVALID(210, "登录方式不正确"),
    CHECK_CODE_NULL(212, "验证码为空"),
    ACCOUNT_ERROR(211, "账号不正确"),
    PASSWORD_ERROR(211, "密码不正确"),
    EMAIL_CODE_EXPIRED(213, "邮箱验证码过期"),
    EMAIL_CODE_MISMATCH(213, "邮箱验证码不正确"),
    UPDATE_CUSTOMER_FAIL(214, "更新客户信息失败"),
    EMAL_USER_ERROR(213, "邮箱用户不存在"),
    EMAL_USER_EXIST(213, "邮箱用户已存在"),
    MOBILE_CODE_MISMATCH(213, "手机验证码不正确"),
    LOGIN_MOBLE_ERROR( 214, "账号不正确"),
    ACCOUNT_STOP( 215, "账号已停用"),
    NODE_ERROR( 216, "该节点下有子节点，不可以删除"),
    CAPTCHA_CODE_ERROR(217, "验证码不正确"),
    CAPTCHA_TIMEOUT_ERROR(217, "验证码过期"),
    VALIDATECODE_ERROR(217 , "验证码错误"),
    USERNAME_EMPTY(219 , "用户名不能为空"),
    PASSWORD_EMPTY(220 , "密码不能为空"),
    USER_DISABLE(221 , "用户已禁用,请联系管理员"),
    USER_DELETE(222 , "用户已删除,请联系管理员"),
    USERNAME_FORMAT_ERROR(223 , "用户名格式错误"),
    LOGIN_ERROR(224 , "登录失败"),
    EMAIL_LIMIT_EXPIRED(225 , "邮箱发送频繁，请稍后再试"),
    EMAIL_SEND_ERROR(226 , "邮件发送失败"),
    DELETE_ROLE_ERROR(230 , "角色下有用户，不可以删除"),
    DELETE_POST_ERROR(231 , "岗位下有用户，不可以删除"),
    DELETE_MENU_ERROR(232, "该菜单下有子菜单，不可以删除"),
    DELETE_DICT_ERROR(233 , "该字典类型下存在数据，无法删除"),
    DELETE_GOODS_CATEGORY_ERROR(234 , "该分类下存在子分类，不可以删除"),
    DELETE_GOODS_BRAND_ERROR(235 , "该品牌下存在商品，无法删除"),
    DELETE_GRADE_ERROR(236 , "该等级下存在用户，不可以删除"),
    STOCK_NOT_ENOUGH(237, "库存不足"),
    STOCK_CONCURRENCY_FAILED(238, "部分库存并发"),
    SIGN_ERROR(300, "签名错误"),
    SIGN_OVERDUE(301, "签名已过期"),
    ID_CHECK_ERROR(305, "身份证校验失败"),
    CART_CHECK_ERROR(306, "驾驶证校验失败"),
    XXL_JOB_ERROR(307, "xxl-job调用失败"),
    FACE_CHECK_ERROR(308, "人脸识别失败"),
    UPLOAD_ERROR(309, "上传失败"),
    AMOUNT_CALC_ERROR(310, "金额计算失败"),
    BALANCE_NOT_ENOUGH(311, "余额不足"),
    PAY_FAIL(312, "支付失败"),
    PAY_PASSWORD_ERROR(313, "支付密码错误"),
    ORDER_NOT_EXIST(332,"订单不存在"),
    STOCK_CHANGE_ERROR  (333,"库存操作失败"),
    COUPON_STOCK_OUT(333,"优惠券库存不足"),

    GOODS_NOT_FOUND(334,"商品不存在"),
    COMMENT_SENSITIVE(335,"评论包含敏感词" ),
    COMMENT_CONTENT_EMPTY(335,"评论检内容为空" ),
    COMMENT_DETECTION_SUCCESS(335,"评论检测成功" ),
    COMMENT_DETECTION_FAIL(335,"评论检测失败" ),
    COMMENT_DETECTION_ERROR(335,"评论检测服务不可用" ),
    COUPON_EXPIRE( 250, "优惠券已过期"),
    COUPON_LESS( 250, "优惠券库存不足"),
    COUPON_USER_LIMIT( 250, "超出领取数量"),
    COUPON_NOT_EXIST( 250, "优惠券不存在"),
    COUPON_EXPESION  ( 250, "存在失效的优惠券预占记录"),
    COUPON_NO_RECEIVE (250, "优惠券不可领取"),


    ORDER_CANCEL_DELAY_QUEUE_FAIL(260,"订单超时取消异常" ),
    ORDER_CANCEL_DELAY_QUEUE_SUCCESS(260,"订单超时取消成功" ),
    ORDER_CANCEL_DELAY_QUEUE_ERROR(260,"订单超时取消失败" ),
    ORDER_DELAY_MESSAGE_FAIL(260,"延迟消息发送失败" ),
    ORDER_NO_AMOUNT_ERROR(260,"订单计算异常" );


    private Integer code;

    private String message;

      ResultCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
